package com.neusoft.feign;

import com.neusoft.core.CommonResult;
import com.neusoft.core.Food;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="food-server", fallback = FoodFeignClientCallBack.class)
public interface FoodFeignClient {
    @GetMapping("/FoodController/GetOneFood")
    public CommonResult<Food> getFoodById(@RequestParam("foodId") Integer foodId);

    @PutMapping("/FoodController/orderFood")
    public void orderFood(@RequestBody Food food);
}
